import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class Ventana extends JFrame
{
		
		JPanel panel1 = new JPanel();
		JPanel panel2 = new JPanel();
		
		JLabel label1 = new JLabel("Login:");
		JTextField txt1= new JTextField(10);
		
		JLabel label2 = new JLabel("Password:");
		JPasswordField txt2= new JPasswordField(10);
				
		JButton btnAceptar = new JButton("Aceptar");
		JButton btnCancelar = new JButton("Cancelar");
		
			
	public Ventana()
	{
		super("Acceso al Sistema");
		configurarPanel();	
		
		getContentPane().add(panel1,"Center");
		getContentPane().add(panel2,"South");
		
		setSize(250,150);//ancho x alto
		setLocation(275,225);
		setVisible(true);
				
		setDefaultCloseOperation(EXIT_ON_CLOSE);
	}
	
	public void configurarPanel()
	{
	    panel1.setLayout(null);
	    
		panel1.add(label1);
		label1.setBounds(10,20,80,20);
		
		panel1.add(txt1);
		txt1.setBounds(90,20,100,20);
		
		panel1.add(label2);
		label2.setBounds(10,50,80,20);
		
		panel1.add(txt2);
		txt2.setBounds(90,50,100,20);
		
		panel2.add(btnAceptar);
		panel2.add(btnCancelar);
		
	
	}
	
	public static void main(String parametros[])
	{
      new Ventana();
    }
     
}

